import { Cell, NodeView } from '@antv/x6';

export const eventMap = {
  'edge:mouseenter': ({ cell, view }: { cell: Cell; view: NodeView }) => {
    cell.addTools([
      {
        name: 'button-remove',
        args: { distance: -20 }
      }
    ]);
  },
  'edge:mouseleave': ({ cell }: { cell: Cell }) => {
    if (cell.hasTool('button-remove')) {
      cell.removeTool('button-remove');
    }
  },

};
